package pl.enigmatic.random;

import java.util.List;


public class RandomLengthRandomString extends RandomString {

	private final int max;

	public RandomLengthRandomString(int max) {
		this.max = max;
	}

	public RandomLengthRandomString(int length, char[] list) {
		super(list);
		this.max = length;
	}

	public RandomLengthRandomString(int length, Character[] list) {
		super(list);
		this.max = length;
	}

	public RandomLengthRandomString(int length, List<Character> list) {
		super(list);
		this.max = length;
	}

	@Override
	protected int getLength() {
		return getInteger(0, max);
	}

}
